
import { request } from '@/utils'
import { AxiosPromise } from 'axios'


export type Channel = {
  id: number
  name: string
}
type ChannelRes = { data: { channels: Channel[] } }


/**
 * 获取频道数据
 */
  export function getChannels(): AxiosPromise<ChannelRes> {

  return request({
    url: '/channels',
    method: 'get',
  })
}
